<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" /> 
        <!-- <link href="assets/css/bootstrap.min.css" rel="stylesheet" /> -->
        <link rel="stylesheet" href="css/style.css"/>      
        <link rel="stylesheet" href="assets/css/ace.min.css" />
        <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
        <!-- <link rel="stylesheet" type="text/css" href="trd/uui/css/tree.css" /> -->
		<link rel="stylesheet" type="text/css" href="trd/uui/css/grid.css" />
		<link rel="stylesheet" type="text/css" href="trd/ip/css/platform.css" />
		<link rel="stylesheet" type="text/css" href="trd/ip/css/ip.css" /> 
        <link rel="stylesheet" type="text/css" href="trd/ip/css/reset.css" />
        <link rel="stylesheet" type="text/css" href="trd/bootstrap/css/bootstrap.css" />
		<!-- <link rel="stylesheet" type="text/css" href="trd/ip/changeTree/changeTree.css" /> -->
        <link rel="stylesheet" href="Widget/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
        <link href="Widget/icheck/icheck.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="mainresource/product/product.css" />   
	    <script src="js/jquery-1.9.1.min.js"></script>   
        <script src="assets/js/bootstrap.min.js"></script>
        <script src="assets/js/typeahead-bs2.min.js"></script>
		<!-- page specific plugin scripts -->
		<script src="assets/js/jquery.dataTables.min.js"></script>
		<script src="assets/js/jquery.dataTables.bootstrap.js"></script>
        <script type="text/javascript" src="js/H-ui.js"></script> 
        <script type="text/javascript" src="js/H-ui.admin.js"></script> 
        <script src="assets/layer/layer.js" type="text/javascript" ></script>
        <script src="assets/laydate/laydate.js" type="text/javascript"></script>
        <script type="text/javascript" src="Widget/zTree/js/jquery.ztree.all-3.5.min.js"></script> 
<title>产品列表</title>
</head>
<body>
	<div id="first">
	<div id="list-page" class="container-fluid ncrd collapse in">
	<!-- 按钮 -->
	<div class="row">
	<div class="col-sm-4 col-md-4 treecontent">
		<div class="panel panel-default panel-body left-tree">
			<div class="tree-search">
				<div class="input-group">
			      <input type="text" class="form-control" placeholder="请输入关键词">
			      <span class="input-group-btn">
			        <button class="btn btn-default treebtn" type="button">
			        	<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
			        </button>
			      </span>
			    </div><!-- /input-group -->
			</div>
			<!-- 左侧树 -->
			<div id="treeTest2" class="ztree" u-meta='{"id":"tree2","data":"listDataTable","type":"tree","idField":"cid","pidField":"pid","nameField":"cname","setting":"treeSetting"}'></div>
		</div>
	</div>

	<div class="col-sm-8 col-md-8">
		<div class="row">
					<!-- <div class="col-md-12"> -->
						<!-- <div class="panel panel-default right-btngroup"> -->
							<!-- 按钮组 -->							
							<!-- <button type="button" class="btn btn-primary pull-right" >取消规则</button>
							<button type="button" class="btn btn-primary pull-right" >设定规则</button>
							<button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="">删除</button>
							<button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="">修改</button> -->
							<!-- <button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="">新增</button> -->
							
							<div class="border clearfix" style="margin-left: 20px;">
						       <span class="l_f">
						        <!-- <a href="picture-add.html" title="添加商品" class="btn btn-warning Order_form"><i class="icon-plus"></i>添加商品</a> -->
						        <button data-bind="click:addProduct" title="添加商品" class="btn btn-warning Order_form"><i class="icon-plus"></i>添加商品</button>
						       </span>
						       <span class="l_f">
						        <!-- <a href="picture-add.html" title="修改商品" class="btn btn-warning Order_form"><i class="icon-bell"></i>修改商品</a> -->
						         <button data-bind="click:editProduct" title="修改商品" class="btn btn-warning Order_form"><i class="icon-edit"></i>修改商品</button>
						       </span>
						       <span class="l_f">
						         <button data-bind="click:getImage" title="查看图片" class="btn btn-warning Order_form"><i class="icon-picture"></i>查看图片</button>
						       </span>
						       <span class="l_f">
						        <button  class="btn btn-warning Order_form" data-bind="click:delProduct"><i class="icon-minus"></i>删除商品</buton>
						       </span>
					        </div>
							
						<!-- </div> -->
					<!-- </div> -->
		</div>
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default panel-body right-grid">
					<!--表格列表 -->
					<div type="text"
					 u-meta='{"id":"write-grid","data":"gridDataTable","type":"grid","showNumCol":"true","editable":false,"autoExpand":false,"showTree":false,"keyField":"theId","parentKeyField":"parentId","onRowFocus":"getSelectedEleRuleDeatilId"}'>
					<!--  <div options='{"field":"column","dataType":"String","title":"设置","editType":"string","width": 200}'></div>-->
					<div options='{"field":"bname","dataType":"String","title":"书籍名称","editType":"string","width": 280}'></div>
					<div options='{"field":"press","dataType":"String","title":"出版社","editType":"string","width": 280}'></div>
					<div options='{"field":"author","dataType":"String","title":"作者","editType":"string","width": 120}'></div>
					</div>
				</div>
			</div>		
		</div>
		
	</div>
	

	</div>
	</div>
	</div>
	
	<div id="callBackPager" class="callBackPager"></div>
	
	<!-- 添加产品图层 -->
	<div class="add_menber" id="add_menber_style" style="display:none">
	<form id="productForm" name="productForm" method="post" enctype="multipart/form-data">
    <ul class=" page-content">
    <input id="bid" name="bid" type="text" style="display: none;"/>
     <li><label class="label_name">书籍名称：</label><span class="add_name"><input id="bname" name="bname" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
     <li><label class="label_name">书籍作者：</label><span class="add_name"><input id="author" type="text" name="author" class="text_add"/></span><div class="prompt r_f"></div></li>
     <li><label class="label_name">书籍价格：</label><span class="add_name"><input id="pricing" name="pricing" type="number" onchange="getDistcount()" class="text_add"/></span><div class="prompt r_f"></div></li>
     <li><label class="label_name">当前价格：</label><span class="add_name"><input id="currPrice" name="currPrice" type="number" onchange="getDistcount()" min="0" step="0.01" class="text_add"/></span><div class="prompt r_f"></div></li>
     <li class="adderss"><label class="label_name">计算折扣：</label><span class="add_name"><input id="discount" name="discount" type="text"  class="text_add" /></span><div class="prompt r_f"></div></li>
     <li><label class="label_name">出&nbsp;&nbsp;版&nbsp;&nbsp;社：</label><span class="add_name"><input id="press" name="press" type="text"  class="text_add"/></span><div class="prompt r_f"></div></li>
     <li class="loginpass"><label class="label_name">出版时间：</label><span class="add_name"><input id="publicationTime" name="publicationTime" type="text"  class="text_add inline laydate-icon"/></span><div class="prompt r_f"></div></li>
      <li><label class="label_name">出版版次：</label><span class="add_name"><select id="edition" name="edition" ></select> </span><div class="prompt r_f"></div></li>
      <li><label class="label_name">书籍分类：</label><span class="add_name"><select id="category" name="cid"></select> </span><div class="prompt r_f"></div></li>
       <li><label class="label_name">选择图片：</label><span class="add_name"><input id="image_w" name="image_w" type="file"  class="text_add"/></span><div class="prompt r_f"></div></li>
    </ul>
    </form>
 </div>
 
 	<div id="img-content">
		<img id="img-x" src="resources/images/common/close2.png" onclick="closeImg()"/>
		<img id="bus-img" src=""/>
	</div>
	<div id="settoverlay" class="overlay"></div>
 
 
 
 
	<!-- 引入js-->
	<script src="trd/requirejs/require.debug.js"></script>
	<!-- <script src="../../js/extendPagination.js" ></script> -->
	<script src="require.config.js"></script>
	<script src="js/jquery-1.9.1.min.js"></script>
	<script src="trd/bootstrap/js/bootstrap.js"></script>
	<script src="js/extendPagination.js" type="text/javascript" ></script>
	<!-- <script src="../../trd/uui/js/u.js"></script> -->
	<script src="mainresource/product/product.js" type="text/javascript"></script>
</body>
</html>
<script type="text/javascript">
laydate({
    elem: '#publicationTime',
    event: 'focus' 
});
//初始化宽度、高度  
 $(".widget-box").height($(window).height()-215); 
$(".table_menu_list").width($(window).width()-260);
 $(".table_menu_list").height($(window).height()-215);
  //当文档窗口发生改变时 触发  
    $(window).resize(function(){
	$(".widget-box").height($(window).height()-215);
	 $(".table_menu_list").width($(window).width()-260);
	  $(".table_menu_list").height($(window).height()-215);
	})
 
		
var code;
		
function showCode(str) {
	if (!code) code = $("#code");
	code.empty();
	code.append("<li>"+str+"</li>");
}
		
//面包屑返回值
var index = parent.layer.getFrameIndex(window.name);
parent.layer.iframeAuto(index);
$('.Order_form').on('click', function(){
	var cname = $(this).attr("title");
	var chref = $(this).attr("href");
	var cnames = parent.$('.Current_page').html();
	var herf = parent.$("#iframe").attr("src");
    parent.$('#parentIframe').html(cname);
    parent.$('#iframe').attr("src",chref).ready();;
	parent.$('#parentIframe').css("display","inline-block");
	parent.$('.Current_page').attr({"name":herf,"href":"javascript:void(0)"}).css({"color":"#4c8fbd","cursor":"pointer"});
	//parent.$('.Current_page').html("<a href='javascript:void(0)' name="+herf+" class='iframeurl'>" + cnames + "</a>");
    parent.layer.close(index);
	
});
</script>
